Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for additional Arexx sensors #3076

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

leighbb
Copy link
Contributor

@leighbb leighbb commented Oct 24, 2024

Add support for Arexx TL-3TSN, TSN-33MN and similar Arexx temperature sensors with ID's in the range 0x2000 - 0x2FFF.

Example output:

time : 2024-10-24 10:11:01
model : Arexx-ML ID : 2a41
Temperature: 21.12 C Sensor Raw: 0a8f Integrity : CRC

int temp_raw = (int16_t)(sens_val << 3); // uses sign-extend
float temp_c = temp_raw / 128;
// Decode readings
float temp_c = 0.0, humidity = 0.0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use a comma, init each var on it's own.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have updated.


switch (msg_len) {
case 5:
if ((id & 0xF000) == 0x2000) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this more plain, e.g. each check like if (msg_len == 5 && (id & 0xF000) == 0x2000) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have updated.

@zuckschwerdt
Copy link
Collaborator

Thanks! Looks good, some minor code style changes needed.

Add support for Arexx TL-3TSN, TSN-33MN and similar Arexx temperature
sensors with ID's in the range 0x2000 - 0x2FFF.

Example output:

time      : 2024-10-24 10:11:01
model     : Arexx-ML     ID        : 2a41
Temperature: 21.12 C     Sensor Raw: 0a8f          Integrity : CRC
@zuckschwerdt
Copy link
Collaborator

Very good, thanks! Let's wait some time for others to have a look, but it's ready for merge.

@zuckschwerdt zuckschwerdt merged commit 4fa3756 into merbanan:master Nov 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants